package com.camunda.workflow.controller.subprocess.call;

import lombok.extern.slf4j.Slf4j;
import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.engine.delegate.JavaDelegate;
import org.springframework.stereotype.Component;

@Slf4j
@Component("addVarsFromSubToMain")
public class AddVarsFromSubToMain  implements JavaDelegate {
    @Override
    public void execute(DelegateExecution execution) throws Exception {
        String targetVideoName = (String)execution.getVariable("targetVideoName");
        log.info("获取主流程传递给子流程的变量：{}",targetVideoName);
        log.info("子流程向主流程输出变量");
        execution.setVariable("targetResult","正常");
    }
}
